package main.java.indi.zyj.sword;

import java.util.concurrent.locks.ReentrantLock;

public class DismantlingAction {

    public char dismantlingAction(String arr) {

        int[] directory = new int[26];

        for (int i = 0; i < arr.length(); i++) {
            directory[arr.charAt(i) - 'a']++;
        }

        for (int i = 0; i < arr.length(); i++) {
            if (directory[arr.charAt(i) - 'a'] == 1) {
                return arr.charAt(i);
            }
        }

        return ' ';

    }


}
